#ifndef GAMETD_ENEMYMANAGER_H
#define GAMETD_ENEMYMANAGER_H

#include "Manager.h"
#include "Enemy.h"
#include "Wave.h"

class EnemyManager : public Manager<EnemyManager> {
    friend class Manager<EnemyManager>;

public:
    void OnUpdate(double delta);
    void OnRender(SDL_Renderer *renderer);
    void SpawnEnemy(EnemyType type, int idxSpawnPoint);
    bool CheckCleared();
    std::vector<Enemy*> &GetEnemyList();

protected:
    EnemyManager() = default;
    ~EnemyManager() = default;

private:
    void ProcessHomeCollision();
    void ProcessBulletCollision();
    void RemoveInvalidEnemy();
    void TrySpawnCoinProp(const Vector2 &position, double ratio);

private:
    std::vector<Enemy*> enemyList;
};


#endif //GAMETD_ENEMYMANAGER_H
